<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<title> 乐铺会员注册 - LooPo-乐铺 </title>
<?php include VIEWS.'header.html'?>
</head>

<body>
<?php include VIEWS.'validation.html'?>
<?php include VIEWS.'topbar.html'?>

<div id="content">

    <?php include VIEWS.'leftnav.html'?>

    <div id="right">

    <h1>会员注册</h1>

<?php if ($code['register'] & 1):?>
<?php
//autologin
$expire = time() + 60; //One min
setcookie('username', $data['username'], $expire);
setcookie('password', md5($data['password']), $expire);
setcookie('autologin', 1, $expire);
?>
<meta http-equiv="refresh" content="10;url=<?php echo $this->request['from'] ? $this->request['from'] : '/'?>">
<div class="goodbox roundNormal">&nbsp;&nbsp;&nbsp;恭喜您已经成为了乐铺的会员!<br />&nbsp;&nbsp;&nbsp;您的会员名是 <b><?php echo $data['username']?></b>，<a href="<?php echo $this->request['from'] ? $this->request['from'] : '/'?>">接下来您将以会员身份访问乐铺！</a></div><br clear="all">

<iframe src="http://groups.google.com/group/loopo/boxsubscribe?email=<?php echo urlencode($data['email'])?>&amp;hl=zh-CN" width="1" height="1" style="display:none"></iframe>
<iframe src="/shell/_newuser.php" width="1" height="1" style="display:none"></iframe>

<div style="text-align:right; margin-top:20px;">
</div>

<?php else:?>

<?php if ($code['register'] & 4):?><div class="errbox roundNormal">&nbsp;&nbsp;&nbsp;注册过程中发生错误，请稍候再试</div><br clear="all"><?php endif;?>
<?php if ($code['register']):?><div class="errbox roundNormal">&nbsp;&nbsp;&nbsp;请修正下列错误信息</div><br clear="all"><?php endif;?>

<form method="post" id="regform" name="regform" action="/imnew.php">
<table border="0">
<tr>
<td>会员名：</td>
<td nowrap="nowrap"><div class="errorbox-<?php echo ($code['register'] & 2 || $code['register'] & 16) ? 'bad' : 'good'?>"><input title="只能由字母或汉字组成，最多10个汉字" autocomplete="off" class="input1 required" id="username" type="text" name="username" value="<?php echo $data['username']?>" size="26" /><div class="errormsg"><?php if ($code['register'] & 16) echo '只能由字母或汉字组成，最多10个汉字'?><?php if ($code['register'] & 2) echo '会员名已存在'?></div></div></td>
<td rowspan="4" class="px12 l14" style="border-left:1px solid #CCC;padding-left:10px;margin:0" valign="top"><h3>在乐铺购物一定要注册吗？</h3>当然不是，我们也觉得注册麻烦透了……您不需要在乐铺注册也可以享受我们的完全服务。不过有一点要说明，在您注册会员后会有更多的可用功能。<br /><br />比如：您可以保存一些常用的收货地址、可以查看您最近的订单列表、累积您的消费积分等等。<br />要不要注册您自己决定吧。：)<br /><br /><b>如果您有 OpenID 或 Google 帐号</b>，无需注册，可以 <a href="/openid">直接在这里登录</a> 哦！</td>
</tr>
<tr><td>密码：</td><td nowrap="nowrap" width="200"><div class="errorbox-<?php echo ($code['register'] & 32) ? 'bad' : 'good'?>"><input title="限制为3-16位，不能包含非法字符" autocomplete="off" class="input1 required validate-length-range-3-16" id="password" type="password" name="password" value="<?php echo $data['password']?>" size="26" /><div class="errormsg"><?php if ($code['register'] & 32) echo '密码限制为3-16位，不能包含某些非法字符'?></div></div></td></tr>
<tr><td nowrap="nowrap">密码确认：</td><td><div class="errorbox-<?php echo ($code['register'] & 128) ? 'bad' : 'good'?>"><input title="确认密码和密码不符" autocomplete="off" class="input1 required equals-password" id="password_r" type="password" name="password_r" value="<?php echo $data['password_r']?>" size="26" /><div class="errormsg"><?php if ($code['register'] & 128) echo '确认密码不符'?></div></div></td></tr>
<tr><td nowrap="nowrap">Email：</td><td><div class="errorbox-<?php echo ($code['register'] & 64 || $code['register'] & 256) ? 'bad' : 'good'?>"><input title="请输入正确的 Email 地址" autocomplete="off" class="input1 required validate-email" id="email" type="text" name="email" value="<?php echo $data['email']?>" size="26" /><div class="errormsg"><?php if ($code['register'] & 256) echo 'Email地址已存在, <a href="/forgotpwd">忘了密码吗</a> ?'?><?php if ($code['register'] & 64) echo 'Email地址不合法'?></div></div></td></tr>
<tr><td colspan="3"><br /><input type="hidden" name="camefrom" value="<?php echo intval($cookie['camefrom'])?>" /><input class="bluebtn" type="submit" value="成为乐铺的会员" name="Submit" style="font-weight:bold;" tabindex="1" /></td></tr>
</table>
</form>

<br clear="all" />

<script type="text/javascript">
<!--
new Validation('regform',{useTitles:true,stopOnFirst:true});
if ($F('email') == "") $('email').focus();
if ($F('password') == "") $('password').focus();
if ($F('username') == "") $('username').focus();
//-->
</script>

<?php endif;?>

    </div>
</div>

<?php include VIEWS.'copyright.html'?>

</body>
</html>
